package dev.loong.boot3.controller;

import org.springframework.web.bind.annotation.*;
import org.springframework.web.servlet.ModelAndView;

@RestController
@RequestMapping("/csrf")
public class CsrfController {
    @GetMapping("/form")
    public ModelAndView form() {
        var mav = new ModelAndView("csrf_form");
        return mav;
    }
    @PostMapping("/commit")
    public String commit(@RequestParam("name") String name) {
        return "提交成功，提交名称为：" + name;
    }
}
